package mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Update;
import pojo.User;

import java.util.List;

public interface UserMapper {
//  方法
//    查询全部User
    List<User> selectAll();
    //    查询单个User
    User seleectOne(int id);
//    插入数据
    void insertOne(User user);
//    删除
    @Delete("DELETE FROM t_user WHERE id=#{id}")
    void deleteOne(int id);
//    修改
    @Update("UPDATE t_user SET username=#{username},fullname=#{fullname},password=#{password},address=#{address}" +
            "WHERE id='3'")
    void updateOne(User user);
}
